cmake_minimum_required(VERSION 3.19)
project(simple_http_server)

include_directories(src src/threadpool src/time src/spdlog/include)
#add_subdirectory(src/spdlog)
set(CMAKE_CXX_STANDARD 17)
# 设置Debug模式下，不开启优化，开启调试，生成更详细的gdb调试信息
set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -ggdb")


add_executable(simple_http_server main.cpp
        src/time/priority_queue.h
        src/threadpool/thread_pool.cpp
        src/threadpool/thread_pool.h
        src/time/time_stamp.cpp
        src/time/time_stamp.h
        src/copyable.h
        src/noncopyable.h
        src/time/timper.cpp
        src/time/timper.h
        src/net/socket.cpp
        src/net/socket.h
        src/log/h_log.cpp src/log/h_log.h src/log/logger_main.h
        src/server/http_server.cpp src/server/http_server.h
        src/net/e_poller.cpp src/net/e_poller.h
        src/http/http_connection.cpp src/http/http_connection.h
        src/http/http_connction_holder.cpp
        src/http/http_connction_holder.h
        src/buffer/buffer.cpp src/buffer/buffer.h
        src/http/response.cpp src/http/response.h
        src/constant/constant.h
        src/util/httprequestparser.h
        src/util/request_util.h
        src/string_utils.h src/setting/local_setting.cpp
        src/setting/local_setting.h src/http/http_request.cpp src/http/http_request.h src/util/IDGenerater.h)
target_link_libraries(simple_http_server PRIVATE pthread )